﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AK.FTP.Core
{
    public class TaskHelper
    {
        private static IList<Task> tasks;

        static TaskHelper()
        {
            tasks = new List<Task>();
        }

        public void NewTask(Task task)
        {
            if (task == null)
            {
                return;
            }

            tasks.Add(task);
            
            if (task.Status == TaskStatus.Created)
            {
                task.Start();
            }
        }
    }
}
